package com.ruoyi.project.system.task.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;

import java.io.Serializable;
import java.util.Date;

public class Task extends BaseEntity implements Serializable {
    /**
    * 任务id
    */
    @Excel(name = "任务编号")
    private Integer taskId;

    /**
    * 任务标题
    */
    @Excel(name = "任务标题")
    private String taskTitle;

    /**
    * 执行人
    */
    @Excel(name = "执行人id")
    private Long executor;

    /**
    * 开始时间
    */
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date starttime;

    /**
    * 结束时间
    */
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endtime;

    /**
    * 创建时间
    */
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createtime;

    /**
    * 任务内容
    */
    @Excel(name = "任务内容")
    private String content;

    /**
    * 状态：0已放弃、1已完成、2未完成
    */
    @Excel(name = "任务状态", readConverterExp = "0=已放弃,1=已完成,2=未完成")
    private Integer status;

    /**
    * 紧急程度：0普通、1紧急、2非常紧急
    */
    @Excel(name = "紧急程度", readConverterExp = "0=普通,1=紧急,2=非常紧急")
    private Integer priority;

    /**
     * 执行人（用户）姓名
     */
    @Excel(name = "执行人姓名")
    private String userName;

    /**
     * 附件
     */
    @Excel(name = "附件")
    private String file;

    /**
     * 物理名称
     */
    @Excel(name = "物理名称")
    private String fileName;

    /**
     *网络地址
     */
    @Excel(name = "网络地址")
    private String url;

    /**
     * 下发人员编号
     */
    @Excel(name = "下发人员编号")
    private int grantId;

    /**
     * 工作成果信息
     */
    private Result result;

    public Result getResult() {
        return result;
    }

    public void setResult(Result result) {
        this.result = result;
    }

    public int getGrantId() {
        return grantId;
    }

    public void setGrantId(int grantId) {
        this.grantId = grantId;
    }

    public String getFile() {
        return file;
    }

    public void setFile(String file) {
        this.file = file;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getTaskId() {
        return taskId;
    }

    public void setTaskId(Integer taskId) {
        this.taskId = taskId;
    }

    public String getTaskTitle() {
        return taskTitle;
    }

    public void setTaskTitle(String taskTitle) {
        this.taskTitle = taskTitle;
    }

    public Long getExecutor() {
        return executor;
    }

    public void setExecutor(Long executor) {
        this.executor = executor;
    }

    public Date getStarttime() {
        return starttime;
    }

    public void setStarttime(Date starttime) {
        this.starttime = starttime;
    }

    public Date getEndtime() {
        return endtime;
    }

    public void setEndtime(Date endtime) {
        this.endtime = endtime;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    @Override
    public String toString() {
        return "Task{" +
                "taskId=" + taskId +
                ", taskTitle='" + taskTitle + '\'' +
                ", executor=" + executor +
                ", starttime=" + starttime +
                ", endtime=" + endtime +
                ", createtime=" + createtime +
                ", content='" + content + '\'' +
                ", status=" + status +
                ", priority=" + priority +
                ", userName='" + userName + '\'' +
                ", file='" + file + '\'' +
                ", fileName='" + fileName + '\'' +
                ", url='" + url + '\'' +
                ", grantId=" + grantId +
                ", result=" + result +
                '}';
    }
}